package com.together.sfipp.service.impl;

import com.together.sfipp.mapper.BabyMapper;
import com.together.sfipp.mapper.LoanMapper;
import com.together.sfipp.pojo.Loan;
import com.together.sfipp.service.LoanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class LoanServiceImpl implements LoanService {
    @Autowired
    private LoanMapper loanMapper;

    @Override
    public void insert(Loan loan) {
        loanMapper.insert(loan);
    }

    @Override
    public void delete(Integer loanId) {
        loanMapper.delete(loanId);
    }

    @Override
    public void update(Loan loan) {
        loanMapper.update(loan);
    }

    @Override
    public List<Loan> selectAll() {
        return loanMapper.selectAll();
    }

    @Override
    public List<Loan> selectNeed(Map<String, Object> params) {
        return loanMapper.selectNeed(params);
    }
}
